package com.situ.day11.homework;

public class Rect {
    private int width;
    private int height;

    public Rect() {
        this(1, 1);
        //this(1);
        //this.width = 1;
        //this.height = 1;
    }

    public Rect(int width) {
        this.width = width;
        this.height = width;
    }

    public Rect(int width, int height) {
        this.width = width;
        this.height = height;
    }

    public int zhouChang() {
        return (width + height) * 2;
    }

    public int mianJi() {
        return width * height;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }
}
